package servlets;

import service.ProductService;

public class TestServlet {

    //这里不用new ProductServiceImpl,写上set方法，交给Spring去管理。
    private ProductService productService;

    public void setProductService(ProductService productService) {
        this.productService = productService;
    }

    public void doGet(){
        doPost();
    }

    public void doPost(){
        productService.listProducts();
    }
}
